﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dbPoll_Application.Models.User>" %>
<%@ Import Namespace="dbPoll_Application.Helpers"%>

<tr class="userRow">
<td><%= Html.ActionLink(Model.UserName, "AccountManager", "Account", new { username = Model.UserName }, null)%></td>
<td><%= Model.FirstName%></td>
<td><%= Model.LastName%></td>
<td><%= Model.Roles.FirstOrDefault().RoleName %></td>
<td><%= Model.CreationDate.ToString("dd/MM/yyyy")%></td>
<td><%= (Model.CreationDate == Model.LastLoginDate) ? "Never" : Model.LastLoginDate.ToString("dd/MM/yyyy")%></td>
<td><input type="button" value="Delete" class="deleteUser"/></td>
</tr>